﻿package part_06_Homework;

import java.util.Scanner;

/*
 * 统计学生五门课程平均分
 */
public class Work_02 {
	public static void main(String[] args) {
		double sum = 0;//成绩之和
		double avg;
		Scanner sc = new Scanner(System.in);
		System.out.print("请输入学生姓名：");
		String name = sc.next();
		for(int i=1;i<=5;i++){
			System.out.print("请输入第"+i+"门课程成绩：");
			double score =sc.nextDouble();
			sum = sum + score;
		}
		avg = sum/5;
		System.out.print(name+"同学五门课程的平均分是："+avg);
	}
}
